<?php
    class ElementsController extends Zend_Controller_Action{
        public function init() {
        	
        }
        
        public function phprequestAction(){
        	$subject = "Đăng ký học PHP, ngày: ".date('Y-m-d H:i:s');
        	$content = nl2br($this->_request->getParam('request_content'));
        	$requestId = $this->addUserRequest($subject,$content);
        	echo $requestId; die();
        }
        
        public function seorequestAction(){
        	$subject = "Yêu cầu SEO từ khóa, ngày: ".date('Y-m-d H:i:s');
        	$website = $this->_request->getParam('website');
        	$keywords = $this->_request->getParam('keywords');
        	$contact = $this->_request->getParam('contact');
        	
        	$content = "<b>Website:</b> ".$website."<br>";
        	$content .= "<b>Từ khóa:</b> <br>".$keywords."<br>";
        	$content .= "<b>Thông tin liên hệ:</b> <br>".$contact."<br>";
        	$content = nl2br($content);
        	$requestId = $this->addUserRequest($subject,$content);
        	echo $requestId; die();
        }
        
        private function addUserRequest($subject,$content){
        	$objUserrequest = new HT_Model_administrator_models_userrequest();
        	$data = array();
        	$data['subject'] 			= $subject;
        	$data['content'] 			= $content;
        	$data['request_status'] 	= 0;
        	$data['request_date'] 		= date('Y-m-d H:i:s');
        	$data['ip_request'] 		= $_SERVER['REMOTE_ADDR'];
        	return $objUserrequest->addData($data);
        }

        public function headerAction(){
            
        }
        public function topmenuAction(){
        
        }
        public function footerAction(){
        
        }
        public function footeradvAction(){
        
        }
        public function analyticstrackingAction(){
        
        }
        
        public function rightadv1Action(){
        	
        }
        
        public function rightadv2Action(){
        	 
        }
        public function rightadv3Action(){
        
        }
        public function rightadv4Action(){
        
        }
        public function rightadv5Action(){
        
        }
        public function rightadv6Action(){
        
        }

    }
?>